/* 
 * File:   ESActor.cpp
 * Author: Semidán Acosta Betancor
 * 
 * Created on 18 de septiembre de 2011, 18:00
 */

#include "ESActor.h"

#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>

namespace ee
{

ESActor::ESActor()
{
}

ESActor::~ESActor()
{
}

bool ESActor::checkCollide(const ee::ESActor& actor)
{
    sf::Vector2f actPosition = actor.GetPosition();
    sf::Vector2f actSize = actor.GetSize();

    if (actPosition.x + actSize.x >= GetPosition().x &&
            actPosition.x < GetPosition().x + GetSize().x &&
            actPosition.y + actSize.y >= GetPosition().y &&
            actPosition.y <= GetPosition().y + GetSize().y)
    {
        return true;
    }

    return false;
}


}


